package java.util.stream.learn.bio.inputstream;

import java.io.File;
import java.io.InputStream;
import java.util.NoSuchElementException;

/**
 * @author wangxiyue@cyou-inc.com
 * @date 2019-11-20
 * @since 1.0.0
 */
public class FileDemo {

    public static void main(String[] args) {
        ClassLoader classLoader = FileDemo.class.getClassLoader();
        InputStream aaa1 = classLoader.getResourceAsStream("aaa");

        String property = System.getProperty("user.dir");
        String path = property + "\\aaa";
        File aaa = new File(path);
        System.out.println(path);
        if (aaa.exists()) {
            System.out.println("找到了文件~~~");
        } else {
            throw new NoSuchElementException();
        }
    }

}
